overlay: Fix coordinates in child_update_style_classes
authorTimm Bäder <mail@baedert.org>
Thu, 1 Mar 2018 20:47:36 +0000 (21:47 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 4 Mar 2018 18:12:04 +0000 (19:12 +0100)
Both main child and all others are in the same coordinate space, so no
need to add the parent position here.

gtk/gtkoverlay.c

index 63636d8cdecf7320e18ae8b6049116a12001cc5b..287d63eb0651d53d6fb8f96d7b3dd62b6d89b435 100644 (file)
@@ -181,7 +181,7 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay,
                                         GtkWidget *child,
                                         GtkAllocation *child_allocation)
 {
-  GtkAllocation overlay_allocation, main_allocation;
+  GtkAllocation main_allocation;
   GtkAlign valign, halign;
   gboolean is_left, is_right, is_top, is_bottom;
   gboolean has_left, has_right, has_top, has_bottom;
@@ -196,10 +196,6 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay,
   is_left = is_right = is_top = is_bottom = FALSE;
 
   gtk_overlay_get_main_widget_allocation (overlay, &main_allocation);
-  gtk_widget_get_allocation (GTK_WIDGET (overlay), &overlay_allocation);
-
-  main_allocation.x += overlay_allocation.x;
-  main_allocation.y += overlay_allocation.y;
 
   halign = effective_align (gtk_widget_get_halign (child),
                             gtk_widget_get_direction (child));